package com.tao.codeblock_;

public class CodeBlock01 {
    public static void main(String[] args) {
        Movie movie1 = new Movie("长津湖");
        System.out.println("================");
        Movie movie2 = new Movie("向阳花",54,"赵丽颖");
    }
}

class Movie{
    private String name;
    private double price;
    private String actor;

    {
        System.out.println("电影屏幕打开");
        System.out.println("开始广告");
        System.out.println("电影正式开始");
    }

    public Movie(String name) {
        System.out.println("Movie(String name)被调用");
        this.name = name;
    }

    public Movie(String name,double price) {
        this.price = price;
    }

    public Movie(String name, double price,String actor) {
        System.out.println("Movie(String name, double price,String actor)被调用");
        this.name = name;
        this.price = price;
    }
}
